﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<hercules.Models.Pessoa>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2>Index</h2>

<p>
    <%: Html.ActionLink("Create New", "Create") %>
</p>
<table>
    <tr>
        <th>
            Pessoa2
        </th>
        <th>
            cpf
        </th>
        <th>
            cnpj
        </th>
        <th>
            nome
        </th>
        <th>
            endereco
        </th>
        <th>
            rg
        </th>
        <th>
            cep
        </th>
        <th>
            estado
        </th>
        <th>
            cidade
        </th>
        <th>
            bairro
        </th>
        <th>
            email
        </th>
        <th>
            insc_estadual
        </th>
        <th>
            banco
        </th>
        <th>
            conta
        </th>
        <th>
            agencia
        </th>
        <th></th>
    </tr>

<% foreach (var item in Model) { %>
    <tr>
        <td>
            <%: Html.DisplayFor(modelItem => item.Pessoa2.cpf) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.cpf) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.cnpj) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.nome) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.endereco) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.rg) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.cep) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.estado) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.cidade) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.bairro) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.email) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.insc_estadual) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.banco) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.conta) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.agencia) %>
        </td>
        <td>
            <%: Html.ActionLink("Edit", "Edit", new { id=item.idPessoa }) %> |
            <%: Html.ActionLink("Details", "Details", new { id=item.idPessoa }) %> |
            <%: Html.ActionLink("Delete", "Delete", new { id=item.idPessoa }) %>
        </td>
    </tr>
<% } %>

</table>

</asp:Content>
